package com.qingcloud.adminbackend.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qingcloud.adminbackend.base.AjaxResult;
import com.qingcloud.adminbackend.entity.role.RolePageRequest;
import com.qingcloud.adminbackend.entity.role.SysRole;
import com.qingcloud.adminbackend.entity.role.SysRoleDto;
import com.qingcloud.adminbackend.entity.role.SysRoleTableDTO;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 角色表 服务类
 * </p>
 *
 * @author wangjinnan
 * @since 2018-12-19
 */
public interface ISysRoleService extends IService<SysRole> {

    /**
     * 用户Type查询用户身份
     *
     * @param roleType
     * @return
     */
    List<SysRole> getRoleIdentity(String roleType, String userId);

    AjaxResult addSysRole(SysRoleDto role, String loginUserId);

    AjaxResult updateSysRole(SysRoleDto role);

    AjaxResult deleteRoles(Integer[] roleIds, String loginUserId);

    AjaxResult<List<SysRole>> findRolesByIds(Integer[] roleIds);

    IPage<SysRoleTableDTO> page(RolePageRequest rolePageRequest);

    AjaxResult<List<SysRole>> findRoles();

    AjaxResult<List<Map<String, Object>>> getFuncTypes();

}
